<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PAD下单</title>
<jsp:include page="/header.jsp"></jsp:include>
<link href="${basePath }/css/ui.css" rel="stylesheet" type="text/css">
</head>
<body>
    <div class="main">
      <a href="${basePath }/pad/index.htm" class="yellow_btn btn">返回</a>
      <c:if test="${detail.hall eq null }">
      <div class="cont">
          <h2 class="title">包间信息：</h2>
          <div class="ui">
              <table class="table_list">
                  <tr class="">
                    <th class="">编号</th>
                    <th>包间名称</th>
                    <th class="">时间</th>
                    <th class="">单价</th>
                    <th class="">小计</th>
                  </tr>
                  <tr class="">
                    <td class="">${detail.room.id }</td>
                    <td class="">${detail.room.name }</td>
                    <td class="">开始时间：${detail.order.start_time_display }<br>
                    结束时间：${detail.order.end_time_display }</td>
                    <td class="">${detail.room.rule_display }</td>
                    <td class="">${detail.order.area_sub_display }</td>
                  </tr>
              </table>
          </div>
      </div>
      </c:if>
      <c:if test="${detail.room eq null }">
      <div class="cont">
          <h2 class="title">桌位信息：</h2>
          <div class="ui">
              <table class="table_list">
                  <tr class="">
                    <th class="">编号</th>
                    <th>座位名称</th>
                    <th class="">时间</th>
                    <th class="">单价</th>
                    <th class="">小计</th>
                  </tr>
                  <tr class="">
                    <td class="">${detail.hall.id }</td>
                    <td class="">${detail.hall.hall_name }</td>
                    <td class="">开始时间：${detail.order.start_time_display }<br>
                    结束时间：${detail.order.end_time_display }</td>
                    <td class="">${detail.hall.rule_display }</td>
                    <td class="">${detail.order.area_sub_display }</td>
                  </tr>
              </table>
          </div>
      </div>
      </c:if>
      <div class="cont">
          <h2 class="title">茶信息：</h2>
          <div class="ui">
              <table class="table_list">
                  <tr class="">
                    <th class="">编号</th>
                    <th>年份-商品名称-中间字</th>
                    <th class="">单位</th>
                    <th class="">单价</th>
                    <th class="">数量</th>
                    <th class="">小计</th>
                  </tr>
                  <c:forEach items="${detail.teas }" var="tea">
                  <tr class="">
                    <td class="">${tea.goods_id }</td>
                    <td class="">${tea.productionyear }-${tea.goods_title }-${tea.middleword }</td>
                    <td class="">${tea.unit_display }</td>
                    <td class="">${tea.goods_price_display }</td>
                    <td class="">${tea.goods_num }</td>
                    <td class="">${tea.amount }</td>
                  </tr>
                  </c:forEach>
              </table>
          </div>
      </div>
      <div class="cont">
          <h2 class="title">样茶信息：</h2>
          <div class="ui">
              <table class="table_list">
                  <tr class="">
                    <th class="">编号</th>
                    <th>年份-商品名称-中间字</th>
                    <th class="">单位</th>
                    <th class="">数量</th>
                    <th class="">价格</th>
                    <th class="">是否收费</th>
                    <th class="">重量</th>
                    <th class="">小计</th>
                  </tr>
                  <c:forEach items="${detail.sampleteas }" var="tea">
                  <tr class="">
                    <td class="">${tea.goods_id }</td>
                    <td class="">${tea.productionyear }-${tea.goods_title }-${tea.middleword }</td>
                    <td class="">${tea.unit_display }</td>
                    <td class="">${tea.goods_num }</td>
                    <td class="">${tea.goods_price_display }</td>
                    <td class="">${tea.free eq 0?'收费':'免费' }</td>
                    <td class="">${tea.weight }</td>
                    <td class="">${tea.amount }</td>
                  </tr>
                  </c:forEach>
              </table>
          </div>
      </div>
    </div>
    <div class="cont">
		<h2 class="title">茶点信息：</h2>
		<div class="ui">
		    <table class="table_list">
		        <tr class="">
		          <th class="">编号</th>
		          <th>规格</th>
		          <th class="">数量</th>
		          <th class="">价格</th>
		          <th class="">是否收费</th>
		          <th class="">小计</th>
		        </tr>
		        <c:forEach items="${detail.desserts }" var="dessert">
		       <tr class="">
		         <td class="">${dessert.goods_id }</td>
		         <td class="">${dessert.goods_title }</td>
		         <td class="">${dessert.goods_num }</td>
		         <td class="">${dessert.goods_price_display }</td>
		         <td class="">${dessert.free eq 0?'收费':'免费' }</td>
		         <td class="">${dessert.amount }</td>
		       </tr>
		       </c:forEach>
		        </table>
		    </div>
		</div>
    </div>
    <div class="cont">
		<h2 class="title">总计：${detail.order.total_sub_display }</h2>
    </div>
    <a href="javascript:window.open('${basePath }/pad/detail.htm?print=1&id=${ detail.order.id}');" target="_blank" class="yellow_btn btn">打印小票</a>
</body>
</html>